<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/style.css">
    <title>Document</title>
    <style>
        .channel{
            position: absolute;
            width: 80%;
            text-align: center;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -200px);
            font-size: 30px;
            font-weight: bold;
            color: #fff;
        }
        .menu ul{
            list-style: none;
        }
        .menu li{
            position: relative;
            float: left;
            width: auto;
        }
        .menu li a{
            display: block;
            background-color: var(--color3);
            color: #fff;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 20px;
            font-weight: bold;
            line-height: 60px;
            min-width: 60px;
            padding: 0 20px;
            text-decoration: none;
            transition: all 0.3s ease-in-out;
        }

        .menu li:hover a{
            background-color: #000;
        }

        /* 子菜单 */
        .sub{
            position: absolute;
            top:60px;
            height: 0;
            left: 0;
            width: 100%;
            text-align: center;
            opacity: 0;
            overflow: hidden;
        }

        li:hover ul.sub{
            opacity: 1;
            height : auto;
        }
        .sub li{
            float: none;
            /* 底部加边线 */
            border-bottom: 1px solid #333;
        }

        .sub li:last-child{
            border-bottom: none;
        }

        .sub a{
            color: #aaa !important;
            font-weight: normal !important;
            line-height: 1.5 !important;
            min-width: auto !important;
            padding: 10px !important;
            background-color: #222 !important;
        }
        .sub li:hover a {
            background-color: #444 !important;
        }
    </style>
</head>
<body>
    <div class="channel">
        bilibili 编译中梦见未来
    </div>
    <div class="container">
        <nav class="menu">
            <ul>
                <li><a href="#">Home</a></li>
                <li>
                    <a href="#">About Me</a>
                    <ul class="sub">
                        <li><a href="" ref="">Photo</a></li>
                        <li><a href="" ref="">Video</a></li>
                    </ul>
                </li>
                <li>
                    <a href="#">Articles on HTML5 & CSS3</a>
                    <ul class="sub">
                        <li><a href="" ref="">Difference between SVG vs. Canvas</a></li>
                        <li><a href="" ref="">New features in HTML5</a></li>
                        <li><a href="" ref="">Creating links to sections within a webpage</a></li>
                    </ul>
                </li>
                <li><a href="#">News</a></li>
                <li><a href="#">Contact Us</a></li>
            </ul>
        </nav>
    </div>
</body>
</html>